home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1996 #15 / Monster Media Number 15 (Monster Media)(July 1996).ISO / math / alged34.zip / ALGEDSRC.ZIP / ALGMAIN.H < prev    next >
C/C++ Source or Header  |  1996-06-06  |  2KB  |  58 lines

  1. #include <stdlib.h>
  2. #include <stdio.h>
  3. #include <string.h>
  4. #include <math.h>
  5. #include <conio.h>
  6. #include <time.h>
  7. #include "mouse.h"
  8.  
  9.  /* operator precedence (for display only) */
  10. int pr[20]={ 1 , 2 , 3 , 3 , 4 , 5 , 6 , 9 , 9 , 9  };
  11. uchar kname[20][3] =
  12.            {"=","?","+","-","·","/","^","?","?","?" };
  13. uchar piname[10] = {227,0};
  14. uchar ename[10] = "e";
  15. uchar iname[10] = "i";
  16. uchar errname[10] = "BAD";         /* for divide by zero etc */
  17. uchar infname[10] = "INF";
  18. uchar halfname[10] = {171,0};
  19. uchar qtrname[10] = {172,0};
  20. uchar hline = 196;
  21. uchar vline = 179;
  22. uchar urc = 191;
  23. uchar llc = 192;
  24. uchar lrc = 217;
  25. uchar ulc = 218;
  26. uchar comma = ',';
  27.  
  28. /*-----------------------------------------------------------------
  29.    GLOBAL VARIABLES
  30.  
  31.    There is an array of formulas read from the file.  numform is the
  32.    number of them, curform is the current formula being edited.
  33.    src and tgt are two selected nodes within the curform.
  34. */
  35. node *firf,*curf;
  36. node *src,*tgt;
  37. char lang[10] = "";          /* language */
  38. int sigdig = 13;        /* doubles have at most 16 sig dig. */
  39. double maxrat = 1000;
  40. int bold1=14,bold2=13,norm=7,mcolor=15+16;
  41. int panx=0,pany=0,yadj=1;
  42. long heapsz;         // size of heap in bytes
  43. int postfix=0;
  44. int maxpow=100;
  45. int numsee = 0;         /* number of formulas currently visible */
  46. int point = 1;               /* europe or usa(1) decimals */
  47. int ch8 = 1;                /* allow 8-bit characters (graphical) */
  48. struct text_info ti;         /* text mode information */
  49.  
  50. int mwidth = 10;             /* max menu item width */
  51. int mheight = 5;           /* see show_menu for calc */
  52. int numm = 0;
  53. struct {
  54.   char name[30];
  55.   int x,y,hot,fid;
  56. } menu[maxm+10];
  57. char top[80],bottom[80],endlist[80],keyname[80];
  58. char *msg[MAXM];